using CodeSaude.Domain.Entities;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace CodeSaude.Infrastructure.Data.EntityConfig
{
    public class paiMap : EntityTypeConfiguration<pai>
    {
        public paiMap()
        {
            // Primary Key
            this.HasKey(t => t.id_pais);

            // Properties
            this.Property(t => t.id_pais)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.descricao)
                .HasMaxLength(90);

            // Table & Column Mappings
            this.ToTable("pais");
            this.Property(t => t.id_pais).HasColumnName("id_pais");
            this.Property(t => t.descricao).HasColumnName("descricao");
        }
    }
}
